﻿<!DOCTYPE html>
<html lang="en">
<head>
    <title>宾果高校</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/swiper.min.css">
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/sweetalert.min.css" />
    <link rel="stylesheet" href="css/ng-pagination.min.css" />
</head>
<body id="dob">
    <div class="header">
        <div class="wrap clearfix">
            <div class="logo-entrance"><img src="images/logo.png" alt=""></div>
            <div class="slogan">
                <p>宾果高校为赞助而生</p>
            </div>
            <div class="hotline">
                <p style="margin-top: 6px;">大客户热线</p>
                <p style="font-size: 20px;font-family: Constantia;color: #F2753F;">400-9955-520</p>
            </div>
        </div>
    </div>
    <div class="main-entrance wrap">
        <div class="clearfix">
            <div class="banner-entrance">
                <div class="swiper-container">
                    <div class="swiper-wrapper">
                        <div class="swiper-slide"><img src="images/audit-banner.jpg" alt=""></div>
                        <div class="swiper-slide">2</div>
                        <div class="swiper-slide">3</div>
                    </div>
                    <div class="swiper-pagination"></div>
                </div>
            </div>
            <div id="divLogin" class="login-box">
                <div class="panel panel-default">
                    <div class="panel-heading"></div>
                    <div class="panel-body">
                        <h2>如有账号，请登录</h2>
                        <form id="formValidate" toggle="validator" class="form-horizontal">
                            <div class="form-group">
                                <input type="number" placeholder="请输入已验证手机" id="Username" data-error="请输入已验证手机号码/邮箱" autofocus="autofocus" required class="form-control">
                                <div class="help-block with-errors"></div>
                            </div>
                            <div class="form-group">
                                <input type="password" placeholder="请输入密码" id="Password" data-error="请输入密码" required class="form-control">
                                <div class="help-block with-errors"></div>
                            </div>
                            <!--<div class="form-group text-right"></div>-->
                            <div class="form-group">
                                <button type="button" class="btn btn-default btn-block" id="btnLogin" onclick="login()">登录</button>
                            </div>
                            <div id="divError" class="form-group" style="color:red; text-align:center"></div>
                            <div class="form-group text-center">
                                <div style="float: left;">
                                    <div style="padding: 0;margin-left: 20px;" class="checkbox">
                                        <span>还没有账号？</span><a href="register.html">立即注册</a>
                                    </div>
                                </div>
                                <div style="float: right;margin-right: 20px;"><a href="toreset.html">忘记密码？</a></div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>

        </div>
        <div class="notice">
            <ul class="clearfix">
                <li>
                    <h2 class="text-center">安全保障</h2>
                    <p>网站保障消费者账号密码等重要信息的安全</p>
                </li>
                <li>
                    <h2 class="text-center">智慧提醒</h2>
                    <p>支持邮箱、手机、等多种方式提醒，时刻了解进度</p>
                </li>
                <li style="margin: 0;">
                    <h2 class="text-center">贴心客服</h2>
                    <p>客服热线：400-9955-520</p>
                    <p>客服邮箱：********@qq.com</p>
                </li>
            </ul>
        </div>
    </div>
    <div class="footer" ng-app="myApp">
        <div class="wrap" ng-controller="newShopCtrl">
            <div class="text-center">
                <p ng-repeat="x in names">
                    <span>{{x.ProjectID}}</span>
                    <span>{{x.ProjectName}}</span>
                </p>
                <div class="pager">
                    <pager page-count="pageCount" current-page="currentPage" on-page-change="onPageChange()" first-text="首页" next-text="下一页" prev-text="上一页" last-text="尾页"></pager>
                </div>
                <p>深圳市*****有限公司 版权所有 2015-2016 粤ICP备440113331382568号<a href="" style="margin-left: 10px;">关于宾果高校  |  帮助中心  |  网站合作 |  版权说明 |  诚聘英才 |  联系我们</a></p>
            </div>
        </div>
    </div>
</body>
</html>
<script src="js/jquery-1.12.2.min.js"></script>
<script src="js/validator.min.js"></script>
<script src="js/swiper.min.js"></script>
<script src="js/sha512.js"></script>
<script src="js/sweetalert.min.js"></script>
<script src="js/common.js"></script>
<script src="js/login.js"></script>
<script src="js/store.min.js"></script>
<script src="js/angular.min.js"></script>
<script src="js/ng-pagination.min.js"></script>
<script>

    fn.swiper();
    var start = 1;
    var limit = 5;

    var par = {};
    par.SchoolName = "广东";
    par.start = start;
    par.limit = limit;

    var app = angular.module('myApp', ['ng-pagination']);
    app.controller('newShopCtrl', function ($http, $scope) {

        $http.post('api/project/search/', par).success(function (data) {
            $scope.names = data.ResponseList;
            $scope.pageCount = 2;
        })

        $scope.onPageChange = function () {

            par.start = $scope.currentPage;

            $http.post('api/project/search/', par).success(function (data) {
                $scope.names = data.ResponseList;
            })
        };
    });

    //common.CreateController({ name: "newShopCtrl", url: "api/project/get/", objType: "list" });

    var isValid = true;

    function AfteAjax(ctx) {

        if (ctx == "" || ctx == null) {
            $('#divError').html("").append("用户名或者密码错误！");
            return;
        }

        store.set("User", ctx);

        switch (ctx.UserType) {
            case 1:
                window.location = "enterprise/index.html";
                break;
            case 2:
                window.location = "personal/index.html";
                break;
            case 3:
                window.location = "agent/index.html";
                break;
            case 4:
                window.location = "admin/index.html";
                break;
        }
    }

    function login() {

        if (!common.validateForm())
            return;

        var values = common.GetCtrlValues({
            ContentID: "formValidate"
        })

        common.commonAjax({ type: 'Post', url: 'api/user/post', data: values, sMethod: AfteAjax });
    }

</script>

